@inherits RenderViewPage
@using Umbraco.Cms.Web
@using PBDesk.com.Extension
@{
    string bannerType = ViewData["BannerType"].ToString();    
    var dummyOne = @DynamicModel.Children.Where("NodeTypeAlias == @0", "abstractContainer");
    if (dummyOne != null && dummyOne.Count() > 0)
    {
        var bannerNodes = dummyOne.First().Children.Where("widgetType == @0", bannerType);
        if (bannerNodes != null && bannerNodes.Count() > 0)
        {
            string className = MyHelper.GetBannerColumnStyle(bannerNodes.Count());
            string divId = bannerType + "banner";
            <div id="@divId">
            @foreach (var node in bannerNodes)
            { 
                <div class="@className">
                    <h2>@Html.Raw(node.AsDynamic().WidgetTitle)</h2>
                    <div style="padding:10px 5px 5px 10px">@Html.Raw(node.AsDynamic().WidgetContent)</div>
                </div>
            }
            </div>           
        }
    }
} 

